# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=watchman
pkgver=4.9.0
pkgrel=2
pkgdesc="A file watching service"
url="https://facebook.github.io/watchman/"
arch="all !s390x !mips !mips64" # broken tests on big-endian
license="Apache-2.0"
makedepends="pcre-dev autoconf automake linux-headers libtool openssl-dev python3-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/facebook/watchman/archive/v$pkgver.tar.gz
	e77eb9597c4c094a0b0bbeef0b957b49b40b87eb.patch
	Replaced-memset-calls-with-appropriate-C++11-init-or-assignment.patch
	"
builddir="$srcdir/"$pkgname-$pkgver

build() {
	cd "$builddir"
	./autogen.sh
	./configure --prefix= --exec-prefix=/usr --enable-lenient
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR=$pkgdir install-binPROGRAMS
}

sha512sums="f25b77f73bca3e25a0254a98af5c8125b8a31133ec3702cac656459f3522d5f0bf2e96d5893ca9fb5ce3ae18adce58224746bd8ca9afc5c312bcd697cb5b2d5d  watchman-4.9.0.tar.gz
6bb0bb780c6f4067e74dcdeafdef3063ac8e1885e7e9529594e83261107975b152b4fde2693d026c275a7dc7b7dc08e209dd772aeea186678933dbbec5a8f1fe  e77eb9597c4c094a0b0bbeef0b957b49b40b87eb.patch
f511cd9bc3468fdf18b09fd7738755fce0cabc4aa1026dfb45066675e359f62ec5b1d69effa2d8cfb9c68520ce7c62bd619ad5681652c418427f0282a7930b99  Replaced-memset-calls-with-appropriate-C++11-init-or-assignment.patch"
